﻿<UserControl x:Name="ScanBarcode" x:Class="Quellenverwaltung.UI.WPF.FindBarcode"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
			 xmlns:quellenverwaltung="clr-namespace:Quellenverwaltung"
             mc:Ignorable="d" Height="496.6" Width="743.4" Loaded="ScanBarcode_Loaded_1" Unloaded="ScanBarcode_Unloaded">
 		<UserControl.Resources>
                    <Color x:Key="FilledColor" A="255" B="155" R="155" G="155"/>
                    <Color x:Key="UnfilledColor" A="0" B="155" R="155" G="155"/>

                    <Storyboard x:Key="Animation0" FillBehavior="Stop" BeginTime="00:00:00.0" RepeatBehavior="Forever"/>
                    <Storyboard x:Key="Animation1" BeginTime="00:00:00.1" RepeatBehavior="Forever"/>
                    <Storyboard x:Key="Animation2" BeginTime="00:00:00.2" RepeatBehavior="Forever"/>
                    <Storyboard x:Key="Animation3" BeginTime="00:00:00.3" RepeatBehavior="Forever"/>
                    <Storyboard x:Key="Animation4" BeginTime="00:00:00.4" RepeatBehavior="Forever"/>
                    <Storyboard x:Key="Animation5" BeginTime="00:00:00.5" RepeatBehavior="Forever"/>
                    <Storyboard x:Key="Animation6" BeginTime="00:00:00.6" RepeatBehavior="Forever"/>
                    <Storyboard x:Key="Animation7" BeginTime="00:00:00.7" RepeatBehavior="Forever"/>
            
            
            
            




        
            
            
                    <DataTemplate x:Key="SearchResultItemTemplateNotSelected">
                    	<Grid Height="Auto" Width="300">
                    		<StackPanel HorizontalAlignment="Stretch" Width="Auto">
                    			<StackPanel HorizontalAlignment="Stretch" Height="Auto" Orientation="Horizontal">
                    				<Path x:Name="iconBookTitle" Data="F1M12.4722,26.6064C13.0362,26.7544,24.7222,29.8354,24.7222,29.8354C24.7222,29.8354,25.9152,30.3134,27.0452,29.0574C28.1752,27.8014,40.4062,14.2024,40.4062,14.2024C40.4062,14.2024,42.5192,12.1004,39.4342,11.3734C36.3492,10.6464,26.9182,8.3534,25.0002,7.9724C23.0822,7.5904,22.4152,8.4614,22.4152,8.4614L9.0702,23.2424C9.0702,23.2424,8.0002,24.0604,8.0002,25.0004C8.0002,25.9394,7.9872,28.6564,8.0002,30.2964C8.0132,31.9374,8.3402,32.7444,10.0892,33.2694C11.8382,33.7944,22.4502,36.7404,25.0002,37.5604C27.5512,38.3804,28.8642,37.9894,29.7452,36.8574C30.6262,35.7254,40.7592,22.4034,40.7592,22.4034C40.7592,22.4034,41.0002,21.7734,41.0002,20.9684L41.0002,18.5594C41.0002,19.2254,40.9842,16.9704,40.1652,17.0004C39.3462,17.0294,39.4672,17.0294,38.8512,17.0004C38.2362,16.9704,38.0462,17.5214,38.0392,17.9894C38.0322,18.4574,38.0262,20.7604,38.0262,20.7604C38.0262,20.7604,38.2992,21.2394,36.8042,23.0434C35.3082,24.8464,28.5552,33.0144,28.0972,33.3344C27.6402,33.6534,27.0412,34.4604,24.5492,33.8334C22.0582,33.2064,12.5212,30.8124,12.0602,30.6074C11.3422,30.2994,11.4462,29.3764,11.4462,29.3764L11.4832,27.5314C11.4832,27.5314,11.9082,26.4584,12.4722,26.6064" Fill="#FF00A3FF" Stretch="Fill" Width="16" HorizontalAlignment="Left" Margin="6,11,0,0" Height="15" VerticalAlignment="Top"/>
                    				<TextBlock TextWrapping="Wrap" Text="{Binding Title}" Width="264.327" Foreground="#FF00A3FF" Margin="7,9,0,3" FontSize="12"/>
                    			</StackPanel>
                    			<TextBlock TextWrapping="Wrap" Text="{Binding AuthorNamesAsString}" FontSize="10.667" Margin="29,0,8,7" Foreground="#FF282828"/>
                    		</StackPanel>
                    	</Grid>
                    </DataTemplate>        
					
	                <Style TargetType="{x:Type ListBoxItem}" x:Key="SearchResultItemTemplate">
	                    <Setter Property="ContentTemplate" Value="{StaticResource SearchResultItemTemplateNotSelected}" />
	                    <Style.Triggers>
	                        <Trigger Property="IsSelected" Value="True">
	                            <Setter Property="ContentTemplate" Value="{StaticResource SearchResultItemTemplateNotSelected}" />
	                        </Trigger>
	                    </Style.Triggers>
	                </Style>
            
					<!-- Flat Button Style -->
					<Style TargetType="Button" x:Key="FlatButtonStyle">
					    <Setter Property="OverridesDefaultStyle" Value="True" />
					    <Setter Property="Background" Value="{x:Null}" />
					    <Setter Property="BorderThickness" Value="0" />
					    <Setter Property="BorderBrush" Value="{x:Null}" />
					    <Setter Property="Template">
					        <Setter.Value>
					            <ControlTemplate TargetType="Button">
					                <Border BorderThickness="{TemplateBinding BorderThickness}"
					                    BorderBrush="{TemplateBinding BorderBrush}"
					                    Background="{TemplateBinding Background}"
					                    Padding="{TemplateBinding Padding}"
					                    CornerRadius="0">
					                        <ContentControl Content="{TemplateBinding Content}" />
					                </Border>
					            </ControlTemplate>
					        </Setter.Value>
					    </Setter>
					    <Style.Triggers>
					        <Trigger Property="IsMouseOver" Value="True">
					            <Setter Property="Background" Value="#FFA9D3F9" />
					        </Trigger>
					        <Trigger Property="IsPressed" Value="True">
					            <Setter Property="Background" Value="#FFA9D3F9" />
					        </Trigger>
					    </Style.Triggers>
					</Style> 

           
                </UserControl.Resources>

                <UserControl.Triggers>
                    <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                        <BeginStoryboard Storyboard="{StaticResource Animation0}"/>
                        <BeginStoryboard Storyboard="{StaticResource Animation1}"/>
                        <BeginStoryboard Storyboard="{StaticResource Animation2}"/>
                        <BeginStoryboard Storyboard="{StaticResource Animation3}"/>
                        <BeginStoryboard Storyboard="{StaticResource Animation4}"/>
                        <BeginStoryboard Storyboard="{StaticResource Animation5}"/>
                        <BeginStoryboard Storyboard="{StaticResource Animation6}"/>
                        <BeginStoryboard Storyboard="{StaticResource Animation7}"/>
                    </EventTrigger>
                </UserControl.Triggers>   
    <Grid x:Name="GridRoot" Margin="0,0,-0.6,-0.8" Background="White">
        <Grid x:Name="leftArea" HorizontalAlignment="Left" Margin="0,0,0,0.6" Width="321">
        	<Border BorderThickness="0 0 0.5 0" BorderBrush="Gray" Margin="8,0,18,0">
        		<Border.Effect>
        			<DropShadowEffect BlurRadius="26" Direction="180" ShadowDepth="0"/>
        		</Border.Effect>
        	</Border>
        	<DockPanel LastChildFill="False" Margin="0,0,26.2,0">
        		<Grid DockPanel.Dock="Top" x:Name="webcamContainer" Margin="10,10,10,0" Background="White" VerticalAlignment="Top" Width="301">	
        			<Label x:Name="labelInitialising" Content="Webcam wird initialisiert..." Margin="8,8,8,0" VerticalAlignment="Top" Height="42" Foreground="#FF464646"/>
        			<Grid x:Name="gridLoadingIndicator" HorizontalAlignment="Left" Height="104" Margin="88.2,50,0,0" VerticalAlignment="Top" Width="124" d:IsHidden="True">
        				<quellenverwaltung:LoadingIndicator Margin="27,31.4,28.2,1.4" />
        			</Grid>
        			<Image x:Name="picturewebcam" Height="221.057" VerticalAlignment="Top" OpacityMask="White" Stretch="UniformToFill" RenderTransformOrigin="0.506,0.515" Margin="-10,-10,-10,0"/>
        			
        			<Grid x:Name="BarcodeScanHelper" Margin="0,-1.2,0,1.2">
        				<Rectangle Fill="#8D000000" Height="70" VerticalAlignment="Top" Margin="-10,-10,-10,0"/>
        				<Rectangle Fill="#8D000000" Height="70" VerticalAlignment="Bottom" Margin="-10,0"/>
        				<Path Data="M44,111.4 L257.62397,111.4" Margin="50,99.595,50,0" Stretch="Fill" Stroke="#FF00A3FF" StrokeThickness="2" HorizontalAlignment="Center" Height="5.8" VerticalAlignment="Top"/>
        				<Grid Height="17" Margin="35,51,36,0" VerticalAlignment="Top">
        					<Path Data="M37.933333,122.66667 L49.133668,122.66667 37.933668,133.06663 z" HorizontalAlignment="Left" Height="8" Margin="0" Stretch="Fill" StrokeThickness="0" VerticalAlignment="Top" Width="8" Fill="#FF44BCFF"/>
        					<Path Data="M44,111.4 L257.62397,111.4" Stretch="Fill" Stroke="#FF44BCFF" StrokeThickness="3" Margin="-1.5,-8,-1.5,8"/>
        					<Path Data="M37.933333,122.66667 L49.133668,122.66667 37.933668,133.06663 z" HorizontalAlignment="Right" Height="8" Stretch="Fill" StrokeThickness="0" VerticalAlignment="Top" Width="8" Fill="#FF44BCFF" RenderTransformOrigin="0.5,0.5">
        						<Path.RenderTransform>
        							<TransformGroup>
        								<ScaleTransform ScaleX="-1"/>
        								<SkewTransform/>
        								<RotateTransform/>
        								<TranslateTransform/>
        							</TransformGroup>
        						</Path.RenderTransform>
        					</Path>
        				</Grid>
        				<Grid Height="17" Margin="35.533,0,35.467,60.739" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5">
        					<Grid.RenderTransform>
        						<TransformGroup>
        							<ScaleTransform/>
        							<SkewTransform/>
        							<RotateTransform Angle="180"/>
        							<TranslateTransform/>
        						</TransformGroup>
        					</Grid.RenderTransform>
        					<Path Data="M37.933333,122.66667 L49.133668,122.66667 37.933668,133.06663 z" HorizontalAlignment="Left" Height="8" Margin="0" Stretch="Fill" StrokeThickness="0" VerticalAlignment="Top" Width="8" Fill="#FF44BCFF"/>
        					<Path Data="M44,111.4 L257.62397,111.4" Stretch="Fill" Stroke="#FF44BCFF" StrokeThickness="3" Margin="-1.5,-8,-1.5,8"/>
        					<Path Data="M37.933333,122.66667 L49.133668,122.66667 37.933668,133.06663 z" HorizontalAlignment="Right" Height="8" Stretch="Fill" StrokeThickness="0" VerticalAlignment="Top" Width="8" Fill="#FF44BCFF" RenderTransformOrigin="0.5,0.5">
        						<Path.RenderTransform>
        							<TransformGroup>
        								<ScaleTransform ScaleX="-1"/>
        								<SkewTransform/>
        								<RotateTransform/>
        								<TranslateTransform/>
        							</TransformGroup>
        						</Path.RenderTransform>
        					</Path>
        				</Grid>
        				<TextBlock Height="37.671" Margin="0,0,0,8" TextWrapping="Wrap" VerticalAlignment="Bottom" Foreground="White" HorizontalAlignment="Center"><Run Language="de-de" Text="Platzieren Sie den Barcode  in dem blauen Raumen"/></TextBlock>
        			</Grid>
        		</Grid>
        		<Grid DockPanel.Dock="Top" x:Name="searchContainer" Margin="0,10,0,0" VerticalAlignment="Top" Width="301">
        			<TextBox x:Name="textBoxSearch" Height="31" Margin="0" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="14.667" Padding="4,4,1,1" KeyUp="textBoxSearch_KeyUp" d:LayoutOverrides="VerticalAlignment" TextChanged="textBoxSearch_TextChanged"/>
        			<Button x:Name="buttonSearch" Style="{DynamicResource FlatButtonStyle}" HorizontalAlignment="Right" Margin="0,1,1,0" Width="32" Foreground="Black" IsCancel="True" FontSize="14.667" Padding="4,4,0,0" Click="buttonSearch_Click" Grid.IsSharedSizeScope="True" VerticalAlignment="Top" Height="30" VerticalContentAlignment="Center" >
        				<Canvas x:Name="Lupe" HorizontalAlignment="Left" UseLayoutRounding="False" Width="20" Margin="3,2,0,3">
        					<Path Data="M18.1895,7.1934C18.1895,10.4894,15.5185,13.1604,12.2225,13.1604C8.9275,13.1604,6.2555,10.4894,6.2555,7.1934C6.2555,3.8984,8.9275,1.2264,12.2225,1.2264C15.5185,1.2264,18.1895,3.8984,18.1895,7.1934z" Height="14.434" Canvas.Left="3.648" StrokeStartLineCap="Flat" Stretch="Fill" StrokeEndLineCap="Flat" StrokeThickness="2.5" StrokeMiterLimit="10" StrokeLineJoin="Miter" Canvas.Top="-1.25" Width="14.434" Stroke="#FF484848"/>
        					<Path Data="M1.3579,17.7744L7.9009,11.2304" Height="9.044" Canvas.Left="-1.25" StrokeStartLineCap="Flat" Stretch="Fill" StrokeEndLineCap="Flat" StrokeThickness="2.5" StrokeMiterLimit="10" StrokeLineJoin="Miter" Canvas.Top="8.754" Width="9.043" Stroke="#FF484848"/>
        				</Canvas>
        			</Button>
                    <TextBlock x:Name="labelSearchingIndicator" Margin="0,35,1,-66.6" FontSize="9.333" Foreground="#FF848484" VerticalAlignment="Top" Height="86" Width="300" TextWrapping="Wrap"/>
                </Grid>
        		<Grid x:Name="searchResultContainer" Width="313.6">
        			<ListBox x:Name="SearchResultList" Margin="9.603,0,-9.5,0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectionChanged="SearchResultList_SelectionChanged" ItemTemplate="{DynamicResource SearchResultItemTemplateNotSelected}" Background="{x:Null}" BorderBrush="{x:Null}" MouseEnter="SearchResultList_MouseEnter" MouseLeave="SearchResultList_MouseLeave">
        				<ListBox.Resources> 
        					<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}">White</SolidColorBrush> 
        					<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}">White</SolidColorBrush> 
        				</ListBox.Resources> 
	
        				<ListBox.ItemContainerStyle>
        					<StaticResource ResourceKey="SearchResultItemTemplate"/>
        				</ListBox.ItemContainerStyle> 
	
        			</ListBox>
        			<Grid x:Name="gridSearchingIndicator" HorizontalAlignment="Left" Height="76.8" Margin="97.803,0,0,0" VerticalAlignment="Top" Width="124" d:LayoutOverrides="VerticalAlignment">
        				<quellenverwaltung:LoadingIndicator Margin="27,8.4,28.2,0" />
        			</Grid>
        		</Grid>
        	</DockPanel>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="347.2"/>
            </Grid.ColumnDefinitions>
            <Grid.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFF3F4F6" Offset="0"/>
                    <GradientStop Color="#FFE1E3E7" Offset="1"/>
                </LinearGradientBrush>
            </Grid.Background>
        </Grid>
        <ScrollViewer Margin="325,0,0,0.6" ScrollViewer.VerticalScrollBarVisibility="Auto">
        	<quellenverwaltung:EditBook x:Name="editBook" ScrollViewer.VerticalScrollBarVisibility="Disabled" HorizontalContentAlignment="Left" Height="Auto" VerticalAlignment="Top" />
        </ScrollViewer>

    </Grid>
</UserControl>
